package com.bci.pwtz.mysql.dao;

import java.util.List;

import org.apache.ibatis.annotations.Param;

import com.bci.pwtz.mysql.model.RandomCode;

public interface RandomCodeMapper {
    int deleteByPrimaryKey(Long id);

    int insert(RandomCode record);

    int insertSelective(RandomCode record);

    RandomCode selectByPrimaryKey(Long id);

    int updateByPrimaryKeySelective(RandomCode record);

    int updateByPrimaryKey(RandomCode record);
    
    int insertDistinct(@Param("id")Long id,@Param("companyId")Long companyId,@Param("companyRoleId")Long companyRoleId,@Param("randomCode")String randomCode,@Param("validDay")int validDay);
    
    void deleteExpireData();
    
    RandomCode selectRandomCode(String randomCode);
    
    List<RandomCode> selectCompanyRandomCode(@Param("companyId")Long companyId);
}